luci-theme-bootstrap: simplify login dialog
authorJo-Philipp Wich <[email protected]>
Thu, 9 Dec 2021 18:48:12 +0000 (19:48 +0100)
committerJo-Philipp Wich <[email protected]>
Tue, 15 Feb 2022 23:43:35 +0000 (00:43 +0100)
commit40051f03027fce36b58023ce3143d3c3b5549ff1
tree68eb7ab845c98a8d3c9fbc5c28062106847e169b
parent1390f78fad4adea8f0a3e3cc06c56b94f236f753
luci-theme-bootstrap: simplify login dialog

Use an traditional HTML form with post submit action to the same URL in
order to simplify the login process and not rely on the discarded login
XHR reply properly setting the login cookie.

This will also avoid one useless request on login and hopefully fix login
issues reported with various browser environments.

As a bonus, the resulting code is somewhat smaller as well.

Ref: https://forum.openwrt.org/t/login-does-not-work/113360
Signed-off-by: Jo-Philipp Wich <[email protected]>
(cherry picked from commit c81b09ec3d83542b9d4be6297c45d0e66896265e)
themes/luci-theme-bootstrap/htdocs/luci-static/resources/view/bootstrap/sysauth.js
themes/luci-theme-bootstrap/luasrc/view/themes/bootstrap/sysauth.htm